/**
 * 
 */
package com.dreamsinpost.activity;

import com.dreamsinpost.R;
import com.dreamsinpost.custom.ArrayAdapterForCustomList;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListAdapter;
import android.widget.ListView;

/**
 * @author ABrysov
 *
 */
public class SelectMediaFile extends Activity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.list_for_media_files);
		
		ListView lvMediaFiles = (ListView)findViewById(R.id.mediafiles_lv);
		ListAdapter adapter = new ArrayAdapterForCustomList(getApplicationContext(),
				Main.getNamesMediaFiles());
		lvMediaFiles.setAdapter(adapter);
		
		lvMediaFiles.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
					long arg3) {
				finish();
			}
		});
		
	}

}
